package com.roamer.school.service.sys.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.roamer.school.repository.entity.sys.SysResource;
import com.roamer.school.repository.mapper.sys.MenuMapper;
import com.roamer.school.service.sys.MenuService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 资源逻辑层 实现
 *
 * @author roamer
 * @version V1.0
 * @date 2019/1/17 23:23
 */
@Transactional(rollbackFor = Exception.class, readOnly = true)
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, SysResource> implements MenuService {

    @Override
    public List<SysResource> findAll() {
        return baseMapper.selectList(null);
    }

    @Override
    public List<String> findAllPerms(Long userId) {
        return baseMapper.queryAllPerms(userId);
    }
}
